package com.serookie.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;


/**
 * @author kevintam
 * @version 1.0
 * @date 2021/5/8 14:54
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="商品分类对象", description="商品分类对象")
public class GoodsCategory{
     @TableId(type = IdType.AUTO)
     @ApiModelProperty("商品分类id")
     private Integer catId;
     @ApiModelProperty("商品分类名")
     private String name;
     @ApiModelProperty("商品分类父分类id")
     private Integer parentCid;
     @ApiModelProperty("商品分类的层级")
     private Integer catLevel;
     @ApiModelProperty(value = "是否显示[0-不显示，1显示]")
     @TableLogic(value = "1" ,delval = "0")
     private Integer showStatus;
     @ApiModelProperty(value = "排序")
     private Integer sort;
     @ApiModelProperty("存放子节点数据")
     @TableField(exist = false)
     @JsonInclude(JsonInclude.Include.NON_EMPTY)
     private List<GoodsCategory> goodsTypeList;
     @ApiModelProperty("图标地址")
     private String icon;
}
